<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<link href="<?= base_url() ?>css/style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>js/loading.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>js/search.js"></script>
<?php echo $this->layouts->print_js_includes() ?>
<script type="text/javascript">
  /**
   * BASE_URL igual a la de CI.
   */
  var BASE_URL = '<?php echo base_url() ?>';
  var INDEX = '<?php echo index_page() ?>';
  var METHOD_URL = BASE_URL + ((INDEX != '') ? (INDEX + '/') : '');
  
  function site_url(url) {
    return METHOD_URL + url;
  }
  
  /**
   * Otras constantes
   */
  var LOADING_ID = '#loading-bar';
</script>
<head>

<title><?php echo $this->settings->get('title'); ?> <?php echo $title_for_layout; ?></title>

</head>

<body>
  <div id="loading-bar">
    <div id="loading-content"><img src="<?php echo base_url() ?>images/loader.gif" class="icon" />&nbsp;&nbsp;Cargando</div>
  </div>
  <div id="alert-bar">
    <div id="alert-content"></div>
  </div>
	<div id="container">
    	<!-- HEADER -->
    	<div id="header">
        	<ul id="menu">
            	<li><?php echo anchor('/', 'Inicio') ?></li>
            	<li><?php echo anchor('mysubjects', 'Mis Cursos') ?></li>
            	<li><?php echo anchor('assistanships/apply', 'Postulaci&oacute;n a ayudant&iacute;as') ?></li>
            	<?php if($this->authentication->logged_in()): ?>
            	<li><?php echo anchor('myprofile', 'Mi Perfil [' . $this->authentication->user['user']['name'] . ']') ?></li>
            	
            	<?php if($this->sg->is_admin()) :?>
            	<li><?php echo anchor('administration', 'Administraci&oacute;n') ?></li>
            	<?php endif; ?>
            	
            	<li><?php echo anchor('auth/logout', 'Salir') ?></li>
            	<?php else: ?>
            	<li><?php echo anchor('auth/login', 'Ingresar') ?></li>
            	<?php endif; ?>
            	<li class="search">
            	  <input type="text" name="query" id="search_box" />
            	</li>
            </ul>
        </div>
        <div class="clear"></div>
        <!-- FIN HEADER -->
        <!-- CONTENT -->
        <div id="content">
			<?php echo $content_for_layout; ?>
        </div>
        <div class="clear"></div>
        <!-- FIN CONTENT -->
        <!-- FOOTER -->
        <div id="footer">
        	<?php echo $this->settings->get('footer'); ?>
        </div>
        <!-- FIN FOOTER -->
   	</div>
</body>

</html>
